package com.infore.exchange.main.quartz;

import com.infore.exchange.main.service.StatisticalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class DayResourceStatisticsTask {

    @Autowired
    private StatisticalService statisticalService;

    @Scheduled(cron = "0 10 * * * ?") // 每小时跑一次
    public void DayResourceStatistics() {
        // 执行任务逻辑
        System.out.println("定时任务执行");
        statisticalService.DayResourceStatistics();


    }
}
